<template>
  <view>

    <NavigationSet :background="aa" title="首页首页首页"></NavigationSet>
    <u-button text="渐变色按钮" @click="Utils.router('/pages/index/index')"></u-button>
  </view>
</template>

<script>
import NavigationSet from "../../components/NavigationSet";
export default {
  components: {NavigationSet},
  props: [],
  data() {
    return {
      aa: "linear-gradient(to top, #3F77FE, #294EFA)",
      isLogin: false,//是否登录
    }
  },
  // 监听页面加载
  onLoad() {
  },
  // 页面每次出现在屏幕上都触发
  onShow() {
  },
  // 页面加载完成
  onReady() {
  },
  methods: {
    /*  //微信小程序专用 登录 获取code和头像昵称
      login() {
        let _this = this;
        uni.login({
          provider: 'weixin',
          success: function (loginRes) {
            uni.setStorageSync('code', loginRes.code);//把code存起来
            //去获取头像 模态框没写 模态框点击确定跳转到 userProfile 方法
            if (!_this.isLogin) {
            }
          }
        });
      },
      //微信小程序专用 获取头像等 模态框确定
      userProfile() {
        let _this = this;
        uni.getUserProfile({
          desc: '获取你的昵称、头像',
          success: infoRes => {
            uni.setStorageSync('nickName', infoRes.userInfo.nickName);//昵称
            uni.setStorageSync('avatarUrl', infoRes.userInfo.avatarUrl);//昵称
          },
        })
      },*/
  }
}
</script>

<style lang="scss" scoped></style>
